package com.ciwong.mobilelib.i;

import android.view.View;
import android.widget.AdapterView;


public abstract class OnItemClickListener extends VertifyDurationListener implements AdapterView.OnItemClickListener {
    /**
     * 构造方法
     */
    public OnItemClickListener() {

    }

    /**
     * 构造方法
     *
     * @param duration 防止重点间隔时间
     */
    public OnItemClickListener(long duration) {
        this.duration = duration;
    }

    @Override
    public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
        if (VertifyDuration()) {
            avertRepeatOnClick(adapterView, view, i, l);
        }
    }

    /**
     * 防止重复点击时调用
     */
    public abstract void avertRepeatOnClick(AdapterView<?> adapterView, View view, int i, long l);

}
